export const getLeft = (width, jnum, maxJ, minJ, left) => {
  return (width / (maxJ - minJ)) * (jnum - minJ) + left;
};

export const getTop = (height, wnum, maxW, minW, top) => {
  return (height / (maxW - minW)) * (maxW - wnum) + top;
};

export const mapMap = {
  gusu: {
    label: '姑苏',
    boundary: {
      width: 570,
      height: 630,
      maxJ: 120.65047,
      minJ: 120.52379,
      maxW: 31.38105,
      minW: 31.25732,
      top: 80,
      left: 74,
    },
  },
  gongyeyuan: {
    label: '工业园',
    boundary: {
      width: 644,
      height: 658,
      maxJ: 120.85907,
      minJ: 120.63517,
      maxW: 31.43778,
      minW: 31.23188,
      top: 80,
      left: 50,
    },
  },
  huqiu: {
    label: '虎丘',
    boundary: {
      width: 734,
      height: 355,
      maxJ: 120.59885,
      minJ: 120.20773,
      maxW: 31.42245,
      minW: 31.22198,
      top: 226,
      left: 0,
    },
  },
  wujiang: {
    label: '吴江',
    boundary: {
      width: 677,
      height: 581,
      maxJ: 120.90018,
      minJ: 120.34781,
      maxW: 31.22744,
      minW: 30.76147,
      top: 140,
      left: 20,
    },
  },
  wuzhong: {
    label: '吴中',
    boundary: {
      width: 773,
      height: 335,
      maxJ: 120.89665,
      minJ: 119.91574,
      maxW: 31.3388,
      minW: 30.92963,
      top: 254,
      left: -10,
    },
  },
  kunshan: {
    label: '昆山',
    boundary: {
      width: 529,
      height: 666,
      maxJ: 121.15478,
      minJ: 120.80009,
      maxW: 31.54435,
      minW: 31.11152,
      top: 82,
      left: 114,
    },
  },
  changshu: {
    label: '常熟',
    boundary: {
      width: 738,
      height: 448,
      maxJ: 121.09455,
      minJ: 120.53717,
      maxW: 31.83803,
      minW: 31.49872,
      top: 170,
      left: 0,
    },
  },
  taicang: {
    label: '太仓',
    boundary: {
      width: 671,
      height: 702,
      maxJ: 121.3785,
      minJ: 120.98365,
      maxW: 31.76409,
      minW: 31.36656,
      top: 70,
      left: 50,
    },
  },
  xiangcheng: {
    label: '相城',
    boundary: {
      width: 746,
      height: 302,
      maxJ: 120.82355,
      minJ: 120.31109,
      maxW: 31.55331,
      minW: 31.33795,
      top: 225,
      left: -10,
    },
  },
  zhangjiagang: {
    label: '张家港',
    boundary: {
      width: 700,
      height: 444,
      maxJ: 120.88996,
      minJ: 120.36413,
      maxW: 32.04653,
      minW: 31.72181,
      top: 180,
      left: 30,
    },
  },
};
